<template>
  <div>
    <h2>getters</h2>
    <button @click="SET_COUNT(1000)">{{ $store.state.count }}</button>
    <hr>
    <button @click="SET_TITLE('hahahs')">{{ $store.state.a.title }}</button>
    <hr>
    <button @click="add(999)">add(999)</button>
    <hr>
    <button @click="addA({ a: 1, b: 2 })">addA(999)</button>
    <hr>
    <button @click="addA1({ a: 1, b: 2 })">addA1(999)</button>
    <hr>
  </div>
</template>
<script>
import { mapMutations, mapActions } from 'vuex'
import { SET_COUNT } from './mutations';

export default {
  computed: {},
  methods: {
    ...mapActions(['add']),
    ...mapActions('a', { addA: 'add' }),
    ...mapActions('a/a1', { addA1: 'add' }),
    ...mapMutations(['SET_COUNT', 'SAY']),
    ...mapMutations({
      ADD_NUM: "ADD"
    }),
    ...mapMutations('a', ['SET_TITLE']),
    // ...mapMutations('a', {
    //   SET_TITLE: "SET_TITLE"
    // }),

    // ...mapMutations('a/a1', ['SET_TITLE']),



  },



}
</script>

<style>
div {
  padding: 10px;
  margin: 10px;
  border: solid;
}
</style>